CXX = g++
CXXFLAGS = -std=c++17 -Wall -Wextra -O2
INCLUDES = -I/usr/include/websocketpp -I/usr/include/jsoncpp
LIBS = -ljsoncpp -lcurl -lsqlite3 -lpthread

TARGET = ai_roleplay_server
SOURCES = main.cpp

all: $(TARGET)

$(TARGET): $(SOURCES)
	$(CXX) $(CXXFLAGS) $(INCLUDES) -o $(TARGET) $(SOURCES) $(LIBS)

clean:
	rm -f $(TARGET)

install_deps:
	@echo "Installing dependencies..."
	@echo "Ubuntu/Debian: sudo apt-get install libwebsocketpp-dev libjsoncpp-dev libcurl4-openssl-dev libsqlite3-dev"
	@echo "CentOS/RHEL: sudo yum install jsoncpp-devel libcurl-devel sqlite-devel"

.PHONY: all clean install_deps